{% extends "base.html" %}

{% import "macros.html" as macros %}

{% block lede %}
{% for page in section.pages %}
  {% if page.extra.headlines %}
    <section class="perf">
      <div class="box">
        <div class="headline"
          title="TLS1.3 server with RSA2048 key and X25519MLKEM768 key exchange"
        >
          {{ macros::speedo(id="full_handshake", rustls=page.extra.handshake.full.rustls, openssl=page.extra.handshake.full.openssl, boringssl=page.extra.handshake.full.boringssl, unit="handshakes/s") }}

          <h1>{{ page.extra.handshake.full.rustls | round }}
            <footer>full handshakes <em>per second per core</em></footer>
          </h1>

          <div class="split">
            <div class="comp">
              <h2>
                <footer>OpenSSL</footer>
                {{ page.extra.handshake.full.openssl | round }}
                {{ macros::compare(target=page.extra.handshake.full.openssl, base=page.extra.handshake.full.rustls) }}
              </h2>
            </div>
            <div class="comp">
              <h2>
                <footer>BoringSSL</footer>
                {{ page.extra.handshake.full.boringssl | round }}
                {{ macros::compare(target=page.extra.handshake.full.boringssl, base=page.extra.handshake.full.rustls) }}
              </h2>
            </div>
          </div>

        </div>
        <div class="headline"
          title="TLS1.3 server with RSA2048 key and X25519MLKEM768 key exchange"
        >
          {{ macros::speedo(id="resume_handshake", rustls=page.extra.handshake.resume.rustls, openssl=page.extra.handshake.resume.openssl, boringssl=page.extra.handshake.resume.boringssl, unit="handshakes/s") }}

          <h1>{{ page.extra.handshake.resume.rustls | round }}
            <footer>resumed handshakes <em>per second per core</em></footer>
          </h1>
          <div class="split">
            <div class="comp">
              <h2>
                <footer>OpenSSL</footer>
                {{ page.extra.handshake.resume.openssl | round }}
                {{ macros::compare(target=page.extra.handshake.resume.openssl, base=page.extra.handshake.resume.rustls) }}
              </h2>
            </div>
            <div class="comp">
              <h2>
                <footer>BoringSSL</footer>
                {{ page.extra.handshake.resume.boringssl | round }}
                {{ macros::compare(target=page.extra.handshake.resume.boringssl, base=page.extra.handshake.resume.rustls) }}
              </h2>
            </div>
          </div>
        </div>
        <div class="headline"
          title="TLS1.3 AES-GCM-256 transmit"
        >
          {{ macros::speedo(id="send_speed", rustls=page.extra.transfer.send.rustls, openssl=page.extra.transfer.send.openssl, boringssl=page.extra.transfer.send.boringssl, unit="MB/s") }}

          <h1>{{ page.extra.transfer.send.rustls | round }}
            <footer>megabytes sent <em>per second per core</em></footer>
          </h1>
          <div class="split">
            <div class="comp">
              <h2>
                <footer>OpenSSL</footer>
                {{ page.extra.transfer.send.openssl | round }}
                {{ macros::compare(target=page.extra.transfer.send.openssl, base=page.extra.transfer.send.rustls) }}
              </h2>
            </div>
            <div class="comp">
              <h2>
                <footer>BoringSSL</footer>
                {{ page.extra.transfer.send.boringssl | round }}
                {{ macros::compare(target=page.extra.transfer.send.boringssl, base=page.extra.transfer.send.rustls) }}
              </h2>
            </div>
          </div>
        </div>
        <div class="headline"
          title="TLS1.3 AES-GCM-256 receive"
        >
          {{ macros::speedo(id="send_speed", rustls=page.extra.transfer.recv.rustls, openssl=page.extra.transfer.recv.openssl, boringssl=page.extra.transfer.recv.boringssl, unit="MB/s") }}

          <h1>{{ page.extra.transfer.recv.rustls | round }}
            <footer>megabytes received <em>per second per core</em></footer>
          </h1>
          <div class="split">
            <div class="comp">
              <h2>
                <footer>OpenSSL</footer>
                {{ page.extra.transfer.recv.openssl | round }}
                {{ macros::compare(target=page.extra.transfer.recv.openssl, base=page.extra.transfer.recv.rustls) }}
              </h2>
            </div>
            <div class="comp">
              <h2>
                <footer>BoringSSL</footer>
                {{ page.extra.transfer.recv.boringssl | round }}
                {{ macros::compare(target=page.extra.transfer.recv.boringssl, base=page.extra.transfer.recv.rustls) }}
              </h2>
            </div>
          </div>
        </div>

      </div>
      <div style="text-align: center"><a href="{{ page.permalink | safe }}">Full results and version information</a></div>
    </section>
  {% endif %}
{% endfor %}

{% endblock lede %}

{% block content %}

<h1 class="title">
  {{ section.title }}
</h1>
<ul>
  {% for page in section.pages %}
  <li><a href="{{ page.permalink | safe }}">{{ page.title }}</a> ({{ page.date }})</li>
  {% endfor %}
</ul>
{{ section.content | safe }}
{% endblock content %}
